
#ifndef __TCS_TPCM_ERROR_H__
#define __TCS_TPCM_ERROR_H__

/** TPCM ERROR */
enum TPCM_ERR{
	TPCM_SUCCESS = 0,
	TPCM_MEASURE_FAIL  = 128,
	TPCM_BADTAG,
	TPCM_NOMEM,	//130
	TPCM_LOAD_ERROR,
	TPCM_SERIALIZE_ERROR,
	TPCM_INVALID_COMMAND,
	TPCM_BAD_PARAMETER,
	TPCM_BAD_PARAM_SIZE,
	TPCM_NOSPACE,
	TPCM_LOG_ERROR,
	TPCM_OUT_SIZE_EXCEEDED,
	TPCM_KEY_ISNULL,
	TPCM_NO_ENTITY,	//140
	TPCM_VERSION_INVERSED,
	TPCM_MAP_FAIL,
	TPCM_VERIFY_FAIL,
	TPCM_VERIFY_REPLAY,
	TPCM_SIZE_EXCEEDED,
	TPCM_LICENSE_INVALID,//38
	TPCM_LICENSE_EXPIRED,
	TPCM_FLASH_WRITE_ERROR,
	TPCM_FLASH_READ_ERROR,
	TPCM_FLASH_ERASE_ERROR,	//150
	TPCM_UNSUPPORTED_FEATURE,
	TPCM_DUPLICATED_DATA,
	TPCM_SIGN_FAILED,
	TPCM_SM3_ERROR,
	TPCM_RESTORE_FAILED,
	TPCM_RESTORE_DEFAULTS,
	TPCM_LICENSE_TYPE_ERROR,
	TPCM_SET_SYSTIME_ERROR,
	TPCM_BAD_PARATYPE,
	TPCM_ADMIN_CERT_NONE , //160
	TPCM_ADMIN_AUTH_FAIL ,
 	TPCM_NO_SECOND_CERT_FAIL ,
 	TPCM_AUTH_PARA_ERROR ,
 	TPCM_BAD_AUTH_TYPE ,
	TPCM_SET_GLOBAL_AUTH_FAIL ,
	TPCM_PASSWORD_AUTH_ERROR,
	TPCM_SM4_ENCRY_ERROR,
	TPCM_PCR_TYPR_INDEX_ERROR,
	TPCM_AUTH_UID_NULL ,
	TPCM_AUTH_NOT_MATCH_SECOND_CERT,	//170
	TPCM_AUTH_FLAG_NO_TRUST ,
	TPCM_AUTH_POLICY_HASH_NO_MATCH,
	TPCM_INVALID_ACTION,	//173
	TPCM_ERROR_MAX
};
	
/** SYSTEM ERROR */
enum{
	TPCM_ERROR_UNSUPPORTED_CMD_TYPE = 256,
	TPCM_ERROR_INVALID_COMMAND,
	TPCM_ERROR_MAP_FAIL,
	TPCM_ERROR_NO_SPACE,
	TPCM_ERROR_INVALID_PARAM,
};

#endif /* __TCS_TPCM_ERROR_H__ */

